import ajax from './ajax';

const BASE_URL = 'https://zddxapi.rzkeji.com/api/';
// const BASE_URL = 'https://sys.dangjianrobot.com/api/';

export const UPLOAD_IMG = BASE_URL + 'file/upload-img/'
export const UPLOAD_VIDEO = BASE_URL + 'file/uploadVideo/'


//用户授权登陆
export const postCode = (params) => ajax(BASE_URL + 'auth/wxAppLogin', params, 'POST');
//设备登录验证
export const smallAppLoginCheck = (params) => ajax(BASE_URL + 'auth/smallAppLoginCheck', params, 'POST');
//识别会议口令
export const getKeyByNumber = (params) => ajax(BASE_URL + 'meeting/getKeyByNumber', params, 'GET');
//获取会议内容(主持人界面)
export const 	sendMeetingContent = (params) => ajax(BASE_URL + 'meeting/sendMeetingContent', params, 'POST');
//获取当前会议内容(参会人界面)
export const 	getNowMeetingContent = (params) => ajax(BASE_URL + 'meeting/getNowMeetingContent', params);
//用户参与会议
export const 	userJoinMeeting = (params) => ajax(BASE_URL + 'meeting/userJoinMeeting', params, 'POST');
//获取在线人数
export const 	getOnlineUserList = (params) => ajax(BASE_URL + 'meeting/getOnlineUserList', params);
//发送聊天消息
export const 	UserSendMessage = (params) => ajax(BASE_URL + 'meeting/UserSendMessage', params, 'POST');
//设置用户昵称
export const 	setUserNickname = (params) => ajax(BASE_URL + 'user/setUserNickname', params, 'POST');
//获取用户个人信息
export const 	getUserInfo = (params) => ajax(BASE_URL + 'meeting/getUserInfo', params);
//设置用户个人信息
export const 	setUserRealname = (params) => ajax(BASE_URL + 'meeting/setUserRealname', params,'POST');
//获取开会信息
export const 	getMeetingActiveInfo = (params) => ajax(BASE_URL + 'meeting/getMeetingActiveInfo', params);
//设置开会信息
export const 	setMeetingActiveInfo = (params) => ajax(BASE_URL + 'meeting/setMeetingActiveInfo', params,'POST');
//主持人加入会议接口
export const 	hostJoinMeeting = (params) => ajax(BASE_URL + 'meeting/hostJoinMeeting', params,'POST');
//获取会议信息
export const 	getMeetingInfo = (params) => ajax(BASE_URL + 'meeting/getMeetingInfo', params);
//主持人发送会议开始请求
export const 	sendMeetingContentToApp = (params) => ajax(BASE_URL + 'meeting/sendMeetingContentToApp', params,'POST');
//发送广播发言状态
export const 	setAllSpeakStatus = (params) => ajax(BASE_URL + 'meeting/setAllSpeakStatus', params,'POST');
//问答

	//获取题库列表
	export const 	getQuestionsPackageList = (params) => ajax(BASE_URL + 'question/getQuestionsPackageList', params);
	//服务端链接
	export const 	serverOnline = (params) => ajax(BASE_URL + 'question/serverOnline', params,'POST');
	//获取题目
	export const 	getQuestionsList = (params) => ajax(BASE_URL + 'question/getQuestionsList', params);
	//获取题目答案
	export const 	getQuestionAnswers = (params) => ajax(BASE_URL + 'question/getQuestionAnswers', params);
	//告知服务的已链接
	export const 	startActive = (params) => ajax(BASE_URL + 'question/startActive', params,'POST');
	//获取答题当前的排行
	export const 	getUsersScore = (params) => ajax(BASE_URL + 'question/getUsersScore', params);

	//用户答题页
		//获取答题人信息
		export const 	getSimpleUserInfo = (params) => ajax(BASE_URL + 'user/getSimpleUserInfo', params);
		//客户端链接
		export const 	clientOnline = (params) => ajax(BASE_URL + 'question/clientOnline', params,'POST');
		//答题
		export const 	sendAnswer = (params) => ajax(BASE_URL + 'question/sendAnswer', params,'POST');
		//答题完成后获取用户分数和排名
		export const 	getUserRankAndFraction = (params) => ajax(BASE_URL + 'question/getUserRankAndFraction', params);

	//答题排行榜页
	export const 	getAnswerRank = (params) => ajax(BASE_URL + 'question/getAnswerRank', params);

//提交base64图片数据接口
export const uploadBase64Image = (params) => ajax(BASE_URL + 'file/uploadBase64Image', params,'POST');

export const getGeneralDetail = (params) => ajax(BASE_URL + 'general/getDetail', params);

export const setGeneralComment = (params) => ajax(BASE_URL + 'general/setComment', params,'POST');

export const setBanner = (params) => ajax(BASE_URL + 'other_sz/setBanner', params,'POST');

export const getBannerList = (params) => ajax(BASE_URL + 'other_sz/getBannerList', params);

//--------start 坪山项目-----------------

//设备登录接口
export const deviceLogin = (params) => ajax(BASE_URL + 'pingshan/wxapp/deviceLogin', params,'POST');
//获取节目单列表接口
export const getProgrammeList = (params) => ajax(BASE_URL + 'pingshan/wxapp/getProgrammeList', params);
//获取用户设备列表接口
export const getUserDeviceList = (params) => ajax(BASE_URL + 'pingshan/wxapp/getUserDeviceList', params);
//获取节目单详情接口
export const getProgrammeDetail = (params) => ajax(BASE_URL + 'pingshan/wxapp/getProgrammeDetail', params);
//设置节目单播放时间接口
export const setProgrammePlayTime = (params) => ajax(BASE_URL + 'pingshan/wxapp/setProgrammePlayTime', params,'POST');
//设置节目单排序接口
export const setProgrammeSort = (params) => ajax(BASE_URL + 'pingshan/wxapp/setProgrammeSort', params,'POST');
//获取总书记日历分类列表
export const getContentRiliTypeList = (params) => ajax(BASE_URL + 'pingshan/wxapp/getContentRiliTypeList', params);
//获取总书记日历内容列表
export const getGeneralContentList = (params) => ajax(BASE_URL + 'pingshan/wxapp/getGeneralContentList', params);
//设置总书记日历内容到节目单（数组）
export const setGeneralContentToProgrammeContent = (params) => ajax(BASE_URL + 'pingshan/wxapp/setGeneralContentToProgrammeContent', params,'POST');
//设置总书记日历内容到节目单(单个)
export const setGeneralContentOneToProgrammeContent = (params) => ajax(BASE_URL + 'pingshan/wxapp/setGeneralContentOneToProgrammeContent', params,'POST');
//删除节目单内容接口
export const delProgrammeContent = (params) => ajax(BASE_URL + 'pingshan/wxapp/delProgrammeContent', params,'POST');
//设置节目单内容排序
export const setProgrammeContentSort = (params) => ajax(BASE_URL + 'pingshan/wxapp/setProgrammeContentSort', params,'POST');
//获取节目单内容预览
export const showProgrammeContentList = (params) => ajax(BASE_URL + 'pingshan/wxapp/showProgrammeContentList', params);
//设置节目单预览
export const setProgrammeDevice = (params) => ajax(BASE_URL + 'pingshan/wxapp/setProgrammeDevice', params,'POST');
//设置节目单上架
export const setProgrammeDeviceActive = (params) => ajax(BASE_URL + 'pingshan/wxapp/setProgrammeDeviceActive', params,'POST');
//设置节目单状态
export const setProgrammeActive = (params) => ajax(BASE_URL + 'pingshan/wxapp/setProgrammeActive', params,'POST');
//设置社区助手内容
export const addCommunityContent = (params) => ajax(BASE_URL + 'pingshan/wxapp/addCommunityContent', params,'POST');
export const setSzContent = (params) => ajax(BASE_URL + 'pingshan/wxapp/setSzContent', params,'POST');
//设置设备标题
export const setDeviceTitle = (params) => ajax(BASE_URL + 'pingshan/wxapp/setDeviceTitle', params,'POST');
//获取社区助手内容接口
export const getCommunityContent = (params) => ajax(BASE_URL + 'pingshan/wxapp/getCommunityContent', params);
